<template>
	<view class="page">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	import { getAgreement } from "@/api/video.js"
	export default {
		data() {
			return {
				type: '',//协议类型
				content: ''
			}
		},
		onLoad(options) {
			this.type = options.type;
			this.getXieyi(this.type);
		},
		methods: {
			getXieyi(type){
				getAgreement({
					id: type
				}).then(res => {
					if(res.errno == 0){
						console.log(res.data,'kkkk')
						this.content = res.data.content;
						uni.setNavigationBarTitle({
							title: res.data.title
						})
					}
				})
			}
		}
	}
</script>

<style>
	.page {
		padding: 40rpx 30rpx;
	}

</style>
